package com.sky.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDateTime;

/**
 * @author ghy
 * @version 1.0.1
 * @date 2023-05-02 09:03:15
 */
//@Component
@Slf4j
public class MyTask {

    @Scheduled(cron = "0/3 * * * * ?")
    public void run() {
        log.warn("任务执行时间:{}", LocalDateTime.now());
    }

}
